package com.woniu.park.controller;

import com.woniu.park.log.SystemControllerLog;

import com.woniu.park.pojo.ParkType;
import com.woniu.park.service.ParkTypeService;
import com.woniu.park.util.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 张洛诚
 * @date 2019/8/30 11:03:31
 * @description
 */
@RestController
@Api(tags = "车位类型")
public class ParkTypeController {

    @Autowired
    ParkTypeService parkTypeService;

    @SystemControllerLog(description = "查询所有车位类型")
    @ApiOperation(value = "查询所有车位类型", notes = "查询所有车位类型")
    @GetMapping("/getAllParkType")
    public JsonResult<List> getAllParkType() {
        List<ParkType> allParkType = parkTypeService.getAllParkType();
        return new JsonResult<List>(allParkType);
    }

}
